package com.platform.system.enums;

public enum PayTypeEnum {
    ALIPAY(1, "支付宝"),
    WECHAT(2, "微信");

    private final int code;
    private final String descp;

    PayTypeEnum(int code, String descp) {
        this.code = code;
        this.descp = descp;
    }

    public int getCode() {
        return code;
    }

    public String getDescp() {
        return descp;
    }

    public static PayTypeEnum of(Integer code) {
        for (PayTypeEnum item : PayTypeEnum.values()) {
            if (item.getCode() == code) return item;
        }
        return null;
    }
}
